Many conventional operating systems have a similar approach to the handling of network traffic. For example, a frame or data packet may be received by a computing device over a network at a network interface card (NIC). An operating system running on the computing device may generate network buffer metadata for the received frame data. This metadata may be referred to as a socket buffer (SKB). The frame data may be passed through a network stack for processing and delivered to a single destination (e.g., a socket associated with a computer application program running on the computing device). As such, the socket buffer is designed to only allow enqueuing to a single destination queue (e.g., a socket queue).
In some cases, a received data packet may be multicast (i.e., intended to be delivered to multiple destinations within the computing device). For example, multiple computer application programs may listen to a single multicast group, and each data packet received for that group must be delivered to each computer application program. To support enqueuing to multiple destination queues, the operating system may clone (e.g., copy) the socket buffer as many times as necessary. Each clone may include pointers to the same frame data, and one clone of the socket buffer may be added to the socket queue for each destination. Cloning the socket buffer, however, requires a relatively slow memory allocation and copy operation. Locking may also be needed to provide mutual exclusion. In addition, since network packet delivery is serialized to prevent re-ordering, this may create a bottleneck in packet processing, leading to an increasing performance degradation as more applications listen on the same multicast group.